package xyz.hubery.service.impl;

import org.springframework.stereotype.Service;
import org.springframework.beans.factory.annotation.Autowired;
import java.util.List;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import xyz.hubery.mapper.SysRoleMapper;
import xyz.hubery.domain.SysRole;
import xyz.hubery.service.SysRoleService;
@Service
public class SysRoleServiceImpl extends ServiceImpl<SysRoleMapper, SysRole> implements SysRoleService{


    @Override
    public boolean isSuperAdmin(Long id) {
        SysRole role = this.getById(id);

        if(role != null) {
            if("ROLE_ADMIN".equals(role.getCode())) {
                return true;
            }
        }

        return false;
    }
}
